<div [@routerTransition]>


  <div class="m-subheader ">
      <div class="row align-items-center">
          <div class="mr-auto col-auto">
              <h3 class="m-subheader__title m-subheader__title--separator">
                  <span>文件借阅</span>
              </h3>
              <span class="m-section__sub">
                  文件借阅管理
              </span>
          </div>
      </div>
  </div>

  <div class="m-content">
      <div class="m-portlet m-portlet--mobile">
          <div class="m-portlet__body">
              <div class="m-form m-form--label-align-right">
                  <form class="horizontal-form" (ngSubmit)="getNormalProduction()">
                      <div class="row align-items-center m--margin-bottom-10">
                            <div class="col-xl-12">
                              <div class="form-group m-form__group align-items-center">
                                <div class="input-group">
                                  <input [(ngModel)]="filterText" name="filterText" autofocus class="form-control m-input"
                                    [placeholder]="l('SearchWithThreeDot')" type="text" />
                                  <span class="input-group-btn">
                                    <button (click)="reloadPage()" class="btn btn-primary" type="submit">
                                      <i class="flaticon-search-1" [attr.aria-label]="l('Search')"></i>
                                    </button>
                                  </span>
                                </div>
                              </div>
                            </div>
                          </div>


                      <div [hidden]="!advancedFiltersAreShown"  >
                        <div class="row m--margin-bottom-10" >
                            <div class="col-md-4">
                              <div class="form-group">
                                <select #techFileInfoTypeCombobox name="sourceName" class="form-control bs-select"
                                title="选择类型" [(ngModel)]="filetype">
                                <option value="0">{{emptyText}}</option>
                                  <option *ngFor="let Item of filetypes" [value]="Item.value">{{Item.displayText}}
                                  </option>
                                </select>
                              </div>
                            </div>

                            <div class="col-md-4">
                              <div class="form-group">
                                <select #stageTypeCombobox name="sourceName" class="form-control bs-select"
                                title="选择阶段"  [(ngModel)]="stage">
                                <option value="0">{{emptyText}}</option>
                                  <option *ngFor="let Item of stages" [value]="Item.value">{{Item.displayText}}</option>
                                </select>
                              </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                  <select #securityTypeCombobox name="sourceName" class="form-control bs-select"
                                  title="选择密级" [(ngModel)]="security">
                                  <option value="0">{{emptyText}}</option>
                                    <option *ngFor="let Item of securitys" [value]="Item.value">{{Item.displayText}}
                                    </option>
                                  </select>
                                </div>
                              </div>
                          </div>
                      </div>
                      <div class="row m--margin-bottom-10">
                          <div class="col-sm-6">
                              <span class="clickable-item text-muted" *ngIf="!advancedFiltersAreShown"
                                  (click)="advancedFiltersAreShown=!advancedFiltersAreShown"><i
                                      class="fa fa-angle-down"></i> 显示更多</span>
                              <span class="clickable-item text-muted" *ngIf="advancedFiltersAreShown"
                                  (click)="advancedFiltersAreShown=!advancedFiltersAreShown"><i
                                      class="fa fa-angle-up"></i> 收起</span>
                          </div>
                      </div>
                  </form>
              </div>
              <tabset class="tab-container tabbable-line">
                  <tab customClass="m-tabs__item">
                      <span *tabHeading>
                          子库 &nbsp;<span class='m-badge m-badge--success'>
                              {{primengTableHelperNormalProductions.totalRecordsCount}}
                          </span>
                      </span>
                      <div class="row margin-bottom-10">
                        <div class="col-sm-12 text-left">
                          <button type="button" (click)="SelectedTechfilejy()"
                          [disabled]="!selectedProducts || !selectedProducts.length"
                          class="btn btn-success">
                              <i class="fa fa-sign-in-alt"></i>借阅
                              <!-- <span class="m-badge m-badge--danger">2</span> -->
                            </button>

                        </div>
                    </div>
                      <div class="row align-items-center">
                          <!--<Primeng-TurboTable-Start>-->
                          <div class="primeng-datatable-container"
                              [busyIf]="primengTableHelperNormalProductions.isLoading">
                              <p-table #dataTableNormalProductions (onLazyLoad)="getNormalProduction($event)"
                                  [(selection)]="selectedProducts" [rowHover]="true" dataKey="id"
                                  [value]="primengTableHelperNormalProductions.records"
                                  rows="{{primengTableHelperNormalProductions.defaultRecordsCountPerPage}}"
                                  [paginator]="false" [lazy]="true" scrollable="true" ScrollWidth="100%"
                                  responsive="primengTableHelperNormalProductions.isResponsive"
                                  resizableColumns="primengTableHelperNormalProductions.resizableColumns">
                                  <ng-template pTemplate="header">
                                      <tr>
                                        <th style="width: 3rem">
                                            <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                        </th>
                                          <th style="width:140px">操作</th>
                                          <th pSortableColumn="techFileInfoType">
                                            类型
                                            <p-sortIcon field="techFileInfoType"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="fileName">
                                            名称
                                            <p-sortIcon field="fileName"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="modelName">
                                            型号
                                            <p-sortIcon field="modelName"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="drawingCode">
                                            图号
                                            <p-sortIcon field="drawingCode"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="drawingName">
                                            图号名称
                                            <p-sortIcon field="drawingName"></p-sortIcon>
                                        </th>
                                        <!-- <th pSortableColumn="paragraphNo">
                                            部段号
                                            <p-sortIcon field="paragraphNo"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="pageCount">
                                            页数
                                            <p-sortIcon field="pageCount"></p-sortIcon>
                                        </th>   -->
                                        <th pSortableColumn="stageType">
                                            阶段
                                            <p-sortIcon field="stageType"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="securityType">
                                            密级
                                            <p-sortIcon field="securityType"></p-sortIcon>
                                        </th>
                                          <th pSortableColumn="status">
                                              状态
                                              <p-sortIcon field="status"></p-sortIcon>
                                          </th>
                                           <th   pSortableColumn="alterationInvoiceCode">
                                            更改单号

                                          </th>
                                          <th pSortableColumn="remarks">
                                              备注
                                              <p-sortIcon field="remarks"></p-sortIcon>
                                          </th>
                                          <!-- <th style="width:80px">日志</th> -->
                                      </tr>
                                  </ng-template>
                                  <ng-template pTemplate="body" let-record="$implicit">
                                      <tr>
                                        <td style="width: 3rem">
                                            <p-tableCheckbox [value]="record"></p-tableCheckbox>
                                        </td>
                                          <td style="width:140px">
                                              <div class="text-left">
                                                  <div class="btn-group dropdown" dropdown container="body">
                                                      <button dropdownToggle
                                                          class="dropdown-toggle btn btn-sm btn-primary">
                                                          <i class="fa fa-cog"></i><span class="caret"></span>
                                                          {{"Actions" | localize}}
                                                      </button>
                                                      <ul class="dropdown-menu" *dropdownMenu>
                                                          <li>
                                                              <a href="javascript:;"
                                                              *ngIf="record.status == 1"
                                                              (click)="borrowfile(record.id)">借阅</a>
                                                          </li>
                                                          <li>
                                                            <a href="javascript:;"
                                                            (click)="showPositionDialog(record.id,event)" >日志</a>
                                                          </li>
                                                      </ul>
                                                  </div>
                                              </div>
                                          </td>
                                          <td>
                                            <span class="ui-column-title">类型</span>
                                            <span *ngIf="record.techFileInfoType == 1" > 图纸</span>
                                            <span *ngIf="record.techFileInfoType == 2" > 技术通知单 </span>
                                            <span *ngIf="record.techFileInfoType == 3" > 偏离单 </span>
                                            <span *ngIf="record.techFileInfoType == 4" > 质疑单 </span>
                                            <span *ngIf="record.techFileInfoType == 5" > 质量通知单 </span>
                                            <span *ngIf="record.techFileInfoType == 6" > 技术条件 </span>
                                            <span *ngIf="record.techFileInfoType == 7" > 技术说明书 </span>
                                        </td>
                                        <td>
                                            <span class="ui-column-title">名称</span>
                                            {{ record.fileName}}
                                        </td>

                                        <td>
                                            <span class="ui-column-title">型号</span>
                                            {{ record.modelName}}
                                        </td>
                                        <td>
                                            <span class="ui-column-title">图号</span>
                                            {{ record.drawingCode}}
                                        </td>
                                        <td>
                                            <span class="ui-column-title">图号名称</span>
                                            {{ record.drawingName}}
                                        </td>
                                        <!-- <td>
                                            <span class="ui-column-title">部段号</span>
                                            {{ record.paragraphNo}}
                                        </td>
                                        <td>
                                            <span class="ui-column-title">页数</span>
                                            {{ record.pageCount}}
                                        </td>  -->
                                        <td>
                                            <span class="ui-column-title">阶段</span>
                                            <span *ngIf="record.stageType == 1" class="m-badge m-badge--success m-badge--wide"> 模态</span>
                                            <span *ngIf="record.stageType == 2" class="m-badge m-badge--success m-badge--wide"> 初样</span>
                                            <span *ngIf="record.stageType == 3" class="m-badge m-badge--success m-badge--wide"> 试样</span>
                                            <span *ngIf="record.stageType == 4" class="m-badge m-badge--success m-badge--wide"> 定型</span>
                                        </td>
                                        <td>
                                            <span class="ui-column-title">密级</span>
                                            <span *ngIf="record.securityType == 1" class="m-badge m-badge--success m-badge--wide"> 内部</span>
                                            <span *ngIf="record.securityType == 2" class="m-badge m-badge--success m-badge--wide"> 秘密</span>
                                            <span *ngIf="record.securityType == 3" class="m-badge m-badge--danger m-badge--wide"> 机密</span>
                                            <span *ngIf="record.securityType == 4" class="m-badge m-badge--danger m-badge--wide"> 绝密</span>

                                        </td>
                                            <td>
                                                <span class="ui-column-title">状态</span>
                                                <span *ngIf="record.status == 1" class="m-badge m-badge--success m-badge--wide"> 正常</span>
                                                <span *ngIf="record.status == 2" class="m-badge m-badge--metal m-badge--wide"> 借出</span>
                                                <span *ngIf="record.status == 3" class="m-badge m-badge--warning m-badge--wide"> 待归还</span>
                                                <span *ngIf="record.status == 4" class="m-badge m-badge--danger m-badge--wide"> 待接收</span>
                                                <span *ngIf="record.status == 5" class="m-badge m-badge--danger m-badge--wide"> 待更新</span>
                                                <span *ngIf="record.status == 6" class="m-badge m-badge--info m-badge--wide"> 借出中</span>
                                                <span *ngIf="record.status == 7" class="m-badge m-badge--info m-badge--wide"> 归还中</span>
                                                <span *ngIf="record.status == 9" class="m-badge m-badge--success m-badge--wide"> 传阅中</span>
                                                <span *ngIf="record.status == 10" class="m-badge m-badge--metal m-badge--wide"> 传阅</span>
                                                <span *ngIf="record.status == 11" class="m-badge m-badge--warning m-badge--wide"> 传阅归还</span> 
                                               
                                            </td>
                                            <td>
                                                <span class="ui-column-title">更改单号</span>
                                                {{ record.alterationInvoiceCode }}
                                              </td>

                                          <td>
                                              <span class="ui-column-title">备注</span>
                                              {{ record.remarks}}
                                          </td>


                                          <!-- <th style="width: 80px">
                                            <p-button (click)="showPositionDialog(record.id,event)"  label="查看" styleClass="p-button-warning"></p-button>
                                         </th> -->
                                      </tr>
                                  </ng-template>
                              </p-table>
                              <div class="primeng-no-data"
                                  *ngIf="primengTableHelperNormalProductions.totalRecordsCount == 0">
                                  没有数据
                              </div>
                              <div class="primeng-paging-container">
                                  <p-paginator [rows]="primengTableHelperNormalProductions.defaultRecordsCountPerPage"
                                      #paginatorNormal (onPageChange)="getNormalProduction($event)"
                                      [totalRecords]="primengTableHelperNormalProductions.totalRecordsCount"
                                      [rowsPerPageOptions]="primengTableHelperNormalProductions.predefinedRecordsCountPerPage">
                                  </p-paginator>
                                  <span class="total-records-count">
                                      共 {{primengTableHelperNormalProductions.totalRecordsCount}} 条
                                  </span>
                              </div>
                          </div>
                          <!--<Primeng-TurboTable-End>-->
                      </div>
                  </tab>
                  <tab customClass="m-tabs__item">
                      <span *tabHeading>
                        借阅 &nbsp;<span class='m-badge m-badge--info'>
                              {{primengTableHelperSpecialProductions.totalRecordsCount}}
                          </span>
                      </span>
                      <div class="row margin-bottom-10">
                        <div class="col-sm-12 text-left">
                          <button type="button" (click)="SelectedTechfilegh()"
                          [disabled]="!selectedProductsgh || !selectedProductsgh.length"
                          class="btn btn-info">
                              <i class="fa la-fast-backward"></i>归还
                              <!-- <span class="m-badge m-badge--danger">2</span> -->
                            </button>
                            <button type="button" (click)="SelectedTechfilecancel()"
                            [disabled]="!selectedProductsgh || !selectedProductsgh.length"
                            class="btn btn-danger">
                            <i class="pi pi-times"></i>取消
                                <!-- <span class="m-badge m-badge--danger">2</span> -->
                              </button>
                        </div>
                    </div>
                      <div class="row align-items-center">
                          <!--<Primeng-TurboTable-Start>-->
                          <div class="primeng-datatable-container"
                              [busyIf]="primengTableHelperSpecialProductions.isLoading">
                              <p-table #dataTableSpecialProductions (onLazyLoad)="getSpecialProduction($event)"
                              [(selection)]="selectedProductsgh" [rowHover]="true" dataKey="id"
                                  [value]="primengTableHelperSpecialProductions.records"
                                  rows="{{primengTableHelperSpecialProductions.defaultRecordsCountPerPage}}"
                                  [paginator]="false" [lazy]="true" scrollable="true" ScrollWidth="100%"
                                  responsive="primengTableHelperSpecialProductions.isResponsive"
                                  resizableColumns="primengTableHelperSpecialProductions.resizableColumns">
                                  <ng-template pTemplate="header">
                                      <tr>
                                        <th style="width: 3rem">
                                            <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                        </th>
                                        <th style="width:140px">操作</th>
                                        <th pSortableColumn="techFileInfoType">
                                            类型
                                            <p-sortIcon field="techFileInfoType"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="fileName">
                                            名称
                                            <p-sortIcon field="fileName"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="modelName">
                                            型号
                                            <p-sortIcon field="modelName"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="drawingCode">
                                            图号
                                            <p-sortIcon field="drawingCode"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="drawingName">
                                            图号名称
                                            <p-sortIcon field="drawingName"></p-sortIcon>
                                        </th>
                                        <!-- <th pSortableColumn="paragraphNo">
                                            部段号
                                            <p-sortIcon field="paragraphNo"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="pageCount">
                                            页数
                                            <p-sortIcon field="pageCount"></p-sortIcon>
                                        </th>   -->
                                        <th pSortableColumn="stageType">
                                            阶段
                                            <p-sortIcon field="stageType"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="securityType">
                                            密级
                                            <p-sortIcon field="securityType"></p-sortIcon>
                                        </th>
                                        <th pSortableColumn="status">
                                            状态
                                            <p-sortIcon field="status"></p-sortIcon>
                                        </th>
                                        <th   pSortableColumn="alterationInvoiceCode">
                                            更改单号

                                          </th>
                                        <th pSortableColumn="remarks">
                                          备注
                                          <p-sortIcon field="remarks"></p-sortIcon>
                                      </th>
                                      </tr>
                                  </ng-template>
                                  <ng-template pTemplate="body" let-record="$implicit">
                                      <tr>
                                        <td style="width: 3rem">
                                            <p-tableCheckbox [value]="record"></p-tableCheckbox>
                                        </td>
                                        <td style="width:140px">
                                            <div class="text-left">
                                                <div class="btn-group dropdown" dropdown container="body">
                                                    <button dropdownToggle
                                                        class="dropdown-toggle btn btn-sm btn-primary">
                                                        <i class="fa fa-cog"></i><span class="caret"></span>
                                                        {{"Actions" | localize}}
                                                    </button>
                                                    <ul class="dropdown-menu" *dropdownMenu>
                                                        <li *ngIf="record.status == 2" >
                                                            <a href="javascript:;"
                                                            (click)="returnfile(record.id)">归还 </a>
                                                        </li>
                                                        <li *ngIf="record.status != 2" >
                                                            <a href="javascript:;"
                                                            (click)="techfilecancel(record.id)">取消 </a>
                                                        </li>

                                                        <li>
                                                            <a href="javascript:;"
                                                            (click)="showPositionDialog(record.id,event)" >日志</a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </td>

                                        <td>
                                            <span class="ui-column-title">类型</span>
                                            <span *ngIf="record.techFileInfoType == 1" > 图纸</span>
                                            <span *ngIf="record.techFileInfoType == 2" > 技术通知单 </span>
                                            <span *ngIf="record.techFileInfoType == 3" > 偏离单 </span>
                                            <span *ngIf="record.techFileInfoType == 4" > 质疑单 </span>
                                            <span *ngIf="record.techFileInfoType == 5" > 质量通知单 </span>
                                            <span *ngIf="record.techFileInfoType == 6" > 技术条件 </span>
                                            <span *ngIf="record.techFileInfoType == 7" > 技术说明书 </span>


                                        </td>
                                        <td>
                                            <span class="ui-column-title">名称</span>
                                            {{ record.fileName}}
                                        </td>

                                        <td>
                                            <span class="ui-column-title">型号</span>
                                            {{ record.modelName}}
                                        </td>
                                        <td>
                                            <span class="ui-column-title">图号</span>
                                            {{ record.drawingCode}}
                                        </td>
                                        <td>
                                            <span class="ui-column-title">图号名称</span>
                                            {{ record.drawingName}}
                                        </td>
                                        <!-- <td>
                                            <span class="ui-column-title">部段号</span>
                                            {{ record.paragraphNo}}
                                        </td>
                                        <td>
                                            <span class="ui-column-title">页数</span>
                                            {{ record.pageCount}}
                                        </td>  -->

                                        <td>
                                            <span class="ui-column-title">阶段</span>
                                            <span *ngIf="record.stageType == 1" class="m-badge m-badge--success m-badge--wide"> 模态</span>
                                            <span *ngIf="record.stageType == 2" class="m-badge m-badge--success m-badge--wide"> 初样</span>
                                            <span *ngIf="record.stageType == 3" class="m-badge m-badge--success m-badge--wide"> 试样</span>
                                            <span *ngIf="record.stageType == 4" class="m-badge m-badge--success m-badge--wide"> 定型</span>
                                        </td>
                                        <td>
                                            <span class="ui-column-title">密级</span>
                                            <span *ngIf="record.securityType == 1" class="m-badge m-badge--success m-badge--wide"> 内部</span>
                                            <span *ngIf="record.securityType == 2" class="m-badge m-badge--success m-badge--wide"> 秘密</span>
                                            <span *ngIf="record.securityType == 3" class="m-badge m-badge--danger m-badge--wide"> 机密</span>
                                            <span *ngIf="record.securityType == 4" class="m-badge m-badge--danger m-badge--wide"> 绝密</span>

                                        </td>
                                        <td>
                                            <span class="ui-column-title">状态</span>
                                              <span *ngIf="record.status == 2" class="m-badge m-badge--success m-badge--wide"> 借阅</span>
                                              <span *ngIf="record.status == 6" class="m-badge m-badge--info m-badge--wide"> 借出中</span>
                                              <span *ngIf="record.status == 7" class="m-badge m-badge--info m-badge--wide"> 归还中</span>
                                        </td>
                                        <td>
                                            <span class="ui-column-title">更改单号</span>
                                            {{ record.alterationInvoiceCode }}
                                          </td>
                                        <td>
                                          <span class="ui-column-title">备注</span>
                                          {{ record.remarks}}
                                      </td>

                                      </tr>
                                  </ng-template>
                              </p-table>
                              <div class="primeng-no-data"
                                  *ngIf="primengTableHelperSpecialProductions.totalRecordsCount == 0">
                                  没有数据
                              </div>
                              <div class="primeng-paging-container">
                                  <p-paginator
                                      [rows]="primengTableHelperSpecialProductions.defaultRecordsCountPerPage"
                                      #paginatorSpecial (onPageChange)="getSpecialProduction($event)"
                                      [totalRecords]="primengTableHelperSpecialProductions.totalRecordsCount"
                                      [rowsPerPageOptions]="primengTableHelperSpecialProductions.predefinedRecordsCountPerPage">
                                  </p-paginator>
                                  <span class="total-records-count">
                                      共 {{primengTableHelperSpecialProductions.totalRecordsCount}} 条
                                  </span>
                              </div>
                          </div>
                          <!--<Primeng-TurboTable-End>-->
                      </div>
                  </tab>
                  <tab customClass="m-tabs__item">
                    <span *tabHeading>
                        待归还 &nbsp;<span class='m-badge m-badge--danger'>
                            {{primengTableRecoverProductions.totalRecordsCount}}
                        </span>
                    </span>
                    <div class="row margin-bottom-10">
                        <div class="col-sm-12 text-left">
                          <button type="button" (click)="SelectedTechfilegh()"
                          [disabled]="!selectedProductsgh || !selectedProductsgh.length"
                          class="btn btn-danger">
                              <i class="fa la-fast-backward"></i>归还
                              <!-- <span class="m-badge m-badge--danger">2</span> -->
                            </button>

                        </div>
                    </div>
                    <div class="row align-items-center">
                        <!--<Primeng-TurboTable-Start>-->
                        <div class="primeng-datatable-container"
                            [busyIf]="primengTableRecoverProductions.isLoading">
                            <p-table #dataTableRecoverProductions (onLazyLoad)="getrecover($event)"
                                [(selection)]="selectedProductsgh" [rowHover]="true" dataKey="id"
                                [value]="primengTableRecoverProductions.records"
                                rows="{{primengTableRecoverProductions.defaultRecordsCountPerPage}}"
                                [paginator]="false" [lazy]="true" scrollable="true" ScrollWidth="100%"
                                responsive="primengTableRecoverProductions.isResponsive"
                                resizableColumns="primengTableRecoverProductions.resizableColumns">
                                <ng-template pTemplate="header">
                                    <tr>
                                        <th style="width: 3rem">
                                            <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                        </th>
                                        <th style="width:140px">操作</th>
                                        <th pSortableColumn="techFileInfoType">
                                          类型
                                          <p-sortIcon field="techFileInfoType"></p-sortIcon>
                                      </th>
                                      <th pSortableColumn="fileName">
                                          名称
                                          <p-sortIcon field="fileName"></p-sortIcon>
                                      </th>
                                      <th pSortableColumn="modelName">
                                          型号
                                          <p-sortIcon field="modelName"></p-sortIcon>
                                      </th>
                                      <th pSortableColumn="drawingCode">
                                          图号
                                          <p-sortIcon field="drawingCode"></p-sortIcon>
                                      </th>
                                      <th pSortableColumn="drawingName">
                                          图号名称
                                          <p-sortIcon field="drawingName"></p-sortIcon>
                                      </th>
                                      <!-- <th pSortableColumn="paragraphNo">
                                          部段号
                                          <p-sortIcon field="paragraphNo"></p-sortIcon>
                                      </th>
                                      <th pSortableColumn="pageCount">
                                          页数
                                          <p-sortIcon field="pageCount"></p-sortIcon>
                                      </th>   -->
                                      <th pSortableColumn="stageType">
                                          阶段
                                          <p-sortIcon field="stageType"></p-sortIcon>
                                      </th>
                                      <th pSortableColumn="securityType">
                                          密级
                                          <p-sortIcon field="securityType"></p-sortIcon>
                                      </th>
                                        <th pSortableColumn="status">
                                            状态
                                            <p-sortIcon field="status"></p-sortIcon>
                                        </th>
                                        <th   pSortableColumn="alterationInvoiceCode">
                                            更改单号

                                          </th>
                                        <th pSortableColumn="remarks">
                                            备注
                                            <p-sortIcon field="remarks"></p-sortIcon>
                                        </th>
                                        <!-- <th style="width:80px">日志</th> -->
                                    </tr>
                                </ng-template>
                                <ng-template pTemplate="body" let-record="$implicit">
                                    <tr>
                                        <td style="width: 3rem">
                                            <p-tableCheckbox [value]="record"></p-tableCheckbox>
                                        </td>
                                        <td style="width:140px">
                                            <div class="text-left">
                                                <div class="btn-group dropdown" dropdown container="body">
                                                    <button dropdownToggle
                                                        class="dropdown-toggle btn btn-sm btn-primary">
                                                        <i class="fa fa-cog"></i><span class="caret"></span>
                                                        {{"Actions" | localize}}
                                                    </button>
                                                    <ul class="dropdown-menu" *dropdownMenu>
                                                        <li>
                                                            <a href="javascript:;"
                                                                (click)="returnfile(record.id)">归还</a>
                                                        </li>
                                                        <li>
                                                          <a href="javascript:;"
                                                          (click)="showPositionDialog(record.id,event)" >日志</a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </td>
                                        <td>
                                          <span class="ui-column-title">类型</span>
                                          <span *ngIf="record.techFileInfoType == 1" > 图纸</span>
                                          <span *ngIf="record.techFileInfoType == 2" > 技术通知单 </span>
                                          <span *ngIf="record.techFileInfoType == 3" > 偏离单 </span>
                                          <span *ngIf="record.techFileInfoType == 4" > 质疑单 </span>
                                          <span *ngIf="record.techFileInfoType == 5" > 质量通知单 </span>
                                          <span *ngIf="record.techFileInfoType == 6" > 技术条件 </span>
                                          <span *ngIf="record.techFileInfoType == 7" > 技术说明书 </span>
                                      </td>
                                      <td>
                                          <span class="ui-column-title">名称</span>
                                          {{ record.fileName}}
                                      </td>

                                      <td>
                                          <span class="ui-column-title">型号</span>
                                          {{ record.modelName}}
                                      </td>
                                      <td>
                                          <span class="ui-column-title">图号</span>
                                          {{ record.drawingCode}}
                                      </td>
                                      <td>
                                          <span class="ui-column-title">图号名称</span>
                                          {{ record.drawingName}}
                                      </td>
                                      <!-- <td>
                                          <span class="ui-column-title">部段号</span>
                                          {{ record.paragraphNo}}
                                      </td>
                                      <td>
                                          <span class="ui-column-title">页数</span>
                                          {{ record.pageCount}}
                                      </td>  -->
                                        <td>
                                            <span class="ui-column-title">阶段</span>
                                            <span *ngIf="record.stageType == 1" class="m-badge m-badge--success m-badge--wide"> 模态</span>
                                            <span *ngIf="record.stageType == 2" class="m-badge m-badge--success m-badge--wide"> 初样</span>
                                            <span *ngIf="record.stageType == 3" class="m-badge m-badge--success m-badge--wide"> 试样</span>
                                            <span *ngIf="record.stageType == 4" class="m-badge m-badge--success m-badge--wide"> 定型</span>
                                        </td>
                                        <td>
                                            <span class="ui-column-title">密级</span>
                                            <span *ngIf="record.securityType == 1" class="m-badge m-badge--success m-badge--wide"> 内部</span>
                                            <span *ngIf="record.securityType == 2" class="m-badge m-badge--success m-badge--wide"> 秘密</span>
                                            <span *ngIf="record.securityType == 3" class="m-badge m-badge--danger m-badge--wide"> 机密</span>
                                            <span *ngIf="record.securityType == 4" class="m-badge m-badge--danger m-badge--wide"> 绝密</span>

                                        </td>
                                            <td>
                                                <span class="ui-column-title">状态</span>
                                                <span *ngIf="record.status == 3" class="m-badge m-badge--danger m-badge--wide"> 待归还</span>
                                            </td>
                                            <td>
                                                <span class="ui-column-title">更改单号</span>
                                                {{ record.alterationInvoiceCode }}
                                              </td>
                                        <td>
                                            <span class="ui-column-title">备注</span>
                                            {{ record.remarks}}
                                        </td>


                                        <!-- <th style="width: 80px">
                                          <p-button (click)="showPositionDialog(record.id,event)"  label="查看" styleClass="p-button-warning"></p-button>
                                       </th> -->
                                    </tr>
                                </ng-template>
                            </p-table>
                            <div class="primeng-no-data"
                                *ngIf="primengTableRecoverProductions.totalRecordsCount == 0">
                                没有数据
                            </div>
                            <div class="primeng-paging-container">
                                <p-paginator [rows]="primengTableRecoverProductions.defaultRecordsCountPerPage"
                                    #paginatorRecover (onPageChange)="getrecover($event)"
                                    [totalRecords]="primengTableRecoverProductions.totalRecordsCount"
                                    [rowsPerPageOptions]="primengTableRecoverProductions.predefinedRecordsCountPerPage">
                                </p-paginator>
                                <span class="total-records-count">
                                    共 {{primengTableRecoverProductions.totalRecordsCount}} 条
                                </span>
                            </div>
                        </div>
                        <!--<Primeng-TurboTable-End>-->
                    </div>
                </tab>
              </tabset>
          </div>
      </div>
  </div>

</div>
<!-- <p-dialog header="日志" [(visible)]="displayPosition"  [modal]="true" [style]="{width: '50vw'}" [baseZIndex]="10000"
    [draggable]="false" [resizable]="false"> -->
    <p-dialog header="日志" [(visible)]="displayBasic" [style]="{width: '55vw'}" [baseZIndex]="10001">

        <p-table #dataTableFileRecordlProductions [value]="primengTableFileRecordProductions.records"  emptyMessage="没有数据"  >
            <ng-template pTemplate="header">
                <tr>
                    <th>发起时间</th>
                    <th>确认时间</th>
                    <th style="width: 100px;">操作</th>
                    <th style="width: 100px;">结果</th>
                    <th>发起人</th>
                    <th>处理人</th>
                </tr>
            </ng-template>
            <ng-template pTemplate="body" let-record>
                <tr>
                    <td>{{ record.creationTime | momentFormat:'YYYY-MM-DD HH:mm'}}</td>
                    <td>

                        <span *ngIf="record.action == 4 || record.action  == 1"  >
                            {{ record.creationTime | momentFormat:'YYYY-MM-DD HH:mm'}}
                        </span>
                        <span *ngIf="record.action != 4 && record.action  != 1"  >
                            {{ record.lastModificationTime | momentFormat:'YYYY-MM-DD HH:mm'}}
                        </span>
                         </td>
                    <td style="width: 100px;">
                        <span *ngIf="record.action  == 1" class="m-badge m-badge--success m-badge--wide"> 接收</span>
                        <span *ngIf="record.action == 2" class="m-badge m-badge--metal m-badge--wide"> 借出</span>
                        <span *ngIf="record.action == 3" class="m-badge m-badge--info m-badge--wide"> 归还</span>
                        <span *ngIf="record.action == 4" class="m-badge m-badge--success m-badge--wide"> 分发</span>
                        <span *ngIf="record.action  == 5" class="m-badge m-badge--success m-badge--wide"> 作废</span>
                        <span *ngIf="record.action == 6" class="m-badge m-badge--metal m-badge--wide"> 取消作废</span>
                        <span *ngIf="record.action == 7" class="m-badge m-badge--info m-badge--wide"> 传阅</span>
                        <span *ngIf="record.action == 8" class="m-badge m-badge--success m-badge--wide"> 传阅归还</span>
                    </td>
                    <td style="width: 100px;">
                        <span *ngIf="record.isiteffective" class="m-badge m-badge--success m-badge--wide"> 接受</span>
                        <span *ngIf="!record.isiteffective && record.userName!=record.confirUserName && record.confirUserName !=null" class="m-badge m-badge--danger m-badge--wide"> 拒绝</span>

                        <span *ngIf="!record.isiteffective && record.userName==record.confirUserName && record.confirUserName !=null" class="m-badge m-badge--danger m-badge--wide"> 取消</span>

                    </td>
                    <td  >
                        发起人：{{record.userName}}

                        <td  >
                             <span *ngIf="record.action == 4 || record.action  == 1"  > 处理人： {{record.userName}}</span>
                             <span *ngIf="record.confirUserName!=null"  > 处理人： {{record.confirUserName}} </span>
                            </td>
                </tr>
            </ng-template>
        </p-table>

            <!-- <ng-template pTemplate="footer">
                <p-button icon="pi pi-check" (click)="displayPosition=false" label="Yes" class="p-button-text"></p-button>
                <p-button icon="pi pi-times" (click)="displayPosition=false" label="No"></p-button>
            </ng-template> -->
      </p-dialog>


<app-receive-techfile-modal #putIntoModal (modalSave)="reloadPage()"></app-receive-techfile-modal>
